{% extends "staff/base.html" %}
{% import 'staff/_formhelpers.html' as forms with context %}

{% block title %}New Course - OK{% endblock %}

{% block main %}
  <section class="content-header">
      <h1>
        Create Course
      </h1>
      <ol class="breadcrumb">
        <li><a href="{{ url_for('.list_courses') }}"><i class="fa fa-list"></i> Courses </a></li>
        <li class="active"><a href="#"><i class="fa fa-plus"></i> Create Course</a></li>
      </ol>
  </section>

  <section class="content">
      {% include 'alerts.html' %}
      <div class="row">
        <div class="col-md-6 col-md-offset-3">
          <!-- Default box -->
            <div class="box">
              <div class="box-body">
                {% call forms.render_form(form, action_url="", action_text='Create Course', class_='form') %}
                    {{ forms.render_field(form.display_name, label_visible=true, placeholder='CS 61A', type='text') }}
                    {{ forms.render_field(form.offering, label_visible=true, placeholder='cal/cs61a/sp16', type='text') }}
                    {{ forms.render_field(form.institution, label_visible=true, placeholder='UC Berkeley', type='text') }}
                    {{ forms.render_field(form.website, label_visible=true, placeholder='http://cs61a.org/', type='text') }}
                    {{ forms.render_field(form.timezone, label_visible=true, type='select') }}
                    {{ forms.render_checkbox_field(form.active, label_visible=true) }}
                {% endcall %}
              </div>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>



  <!-- </body> do not close body in template-->
{% endblock %}
